﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using VoL.Domain.IServices;
using VOL.Core.Utilities;

namespace VOL.WebApi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class EquipmentController : ControllerBase
    {
        private readonly IEquipmentService _equipmentService;

        public EquipmentController(IEquipmentService equipmentService)
        {
            _equipmentService = equipmentService;
        }

        /// <summary>
        /// 树形查询护理单元
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public Task<WebResponseContent> GetUnitTree()
        {
            return _equipmentService.GetUnitTree();
        }
    }
}
